<style>
    .modal.fade.in{
        top:90px;
    }

</style>
<link href="/Portal/Mobile/css/formMobile/detail.css" rel="stylesheet"/>
<div ng-app="mvcJspModule">
        <div class="row" ng-controller="mvcJspCtrl" style="margin:10px">
            <div  class="col-md-2" data-title="">
                <span  data-type="SheetLabel" data-datafield="approvalOpinion" style="display: block;">评论</span>
                <a class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal" id="addComment" style="display: none">添加评论</a>
                <!-- 模态框（Modal） -->
                <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                                <h4 class="modal-title" id="myModalLabel">评论内容</h4>
                            </div>
                            <div class="modal-body" style="padding-left:20px;padding-right:50px;">
                                <form class="bs-example form-horizontal">
                                    <div class="row">
                                        <div class="col-md-10">
                                            <div class="form-group">
                                                <label class="col-md-2 control-label" >内容</label>
                                                <label class="col-md-10 control-label alignLeft">
                                <textarea ng-model="comments.inner" style="width:99%;height: 200px" rows="5"
                                          class="form-control"></textarea>
                                                </label>
                                            </div>
                                        </div>
                                        <div class="col-md-2">

                                        </div>
                                    </div>
                                    <div class="row">
                                        <a href="javascript:;" class="a-file"><span><i class="icon ion-image"></i></span><span>图片</span>
                                            <input type="file" name="file" ngf-select="uploadImg($file)" ng-model="file" ngf-pattern="'image/*'" ngf-accept="'image/*'" ngf-max-size="10MB">
                                        </a>
                                    </div>
                                    <div class="row">
                                        <a href="javascript:;" class="a-file"><span><i class="icon ion-paperclip"></i></span><span>附件选择</span>
                                            <input type="file" name="file" ngf-select="uploadFiles($files)" ng-model="files" name="files" ngf-max-size="30MB">
                                        </a>
                                    </div>
                                    <!--图片列表-->
                                    <div class="img-view" ng-if="comments.imgList.length > 0">
                                        <div class="img-view-box" ng-repeat="item in comments.imgList track by $index">
                    <span class="img-delete" ng-click="deleteImg(item,$index)">
                        <i class="icon ion-close"></i>
                    </span>
                                            <img  ngf-thumbnail="item.url" alt="" ng-click="imgPreview(item, $index)" style="width: 80px;height: 90px" />
                                        </div>
                                    </div>
                                    <!--文件-->
                                    <div class="file-view" ng-if="comments.filesList.length > 0">
                                        <div class="file-view-box" ng-repeat="item in comments.filesList track by $index">
                                            <p class="file-name">
                        <span class="file-name-icon">
                             <i class="icon ion-ios-folder-outline"></i>
                        </span>
                                                <span>{{ item.fileName|limitTo:20}}</span>
                                            </p>
                                            <p class="file-action">
                                                <span class="file-view-action" ng-click="PreviewFile(item, $index)">预览</span>
                                                <span class="file-delete" ng-click="deleteFile(item, $index)">
                             <i class="icon ion-close"></i>
                        </span>
                                            </p>
                                        </div>
                                    </div>

                                </form>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                <button type="button" class="btn btn-primary" ng-click="addDataDetail()">提交更改</button>
                            </div>
                        </div><!-- /.modal-content -->
                    </div><!-- /.modal -->
                </div>
            </div>
            <div  class="col-md-10" data-title="评论">
                <div  data-datafield="approvalOpinion" data-type="SheetComment" style="" class="SheetComment">
                    <div class="widget-comments bordered">
                        <div>
                            <div class="comment" ng-repeat="item in commentsDetail.list track by $index">

                                <img alt="" ng-if="item.userAvator==''" ng-src="/Portal/img/user.jpg" class="comment-avatar">
                                <img alt="" ng-if="!item.userAvator==''" ng-src="{{item.userAvator}}" class="comment-avatar">
                                <div class="comment-body comment-line">
                                    <div class="comment-by">
                                        <a href="javascript:void(0)">{{item.userName}}</a>
                                        <span style="padding-left:5px;">{{item.createdTime | date:'yyyy-MM-dd HH:mm:ss'}}</span>
                                    </div>
                                    <div class="comment-text" ng-bind-html="item.content">
                                    </div>
                                    <div class="item-attachments" >
                                        <div class="item-img-box">
                                            <div class="item-img" ng-repeat="inner in item.attachments track by $index"  ng-if="inner.display === true">
                                            <span class="item-img-list">
                                                 <img
                                                         ngf-thumbnail="inner.url"
                                                         alt=""
                                                         ng-click="imgPreview(inner, $index)" />
                                                <!--<span>{{inner.fileName}}</span>-->
                                            </span>
                                                <!--ngf-thumbnail="item.url"-->
                                                <!--src="http://img4.imgtn.bdimg.com/it/u=3523923595,1898456857&fm=200&gp=0.jpg"-->
                                            </div>
                                        </div>
                                        <div class="item-file"
                                             ng-repeat="inner in item.attachments track by $index"
                                             ng-if="inner.display === false"
                                             ng-click="PreviewFile(inner, $index)">
                                            <p class="item-file-name">
                                                <span class="item-file-icon">
                                                   <i class="icon ion-ios-folder-outline"></i>
                                                </span>
                                                <span class="item-file-icon">
                                                    <span>{{inner.fileName}}</span>
                                                </span>
                                                <span style="margin-left: 50px">下载</span>
                                            </p>


                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>


    </div>
